package com.jt.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
@TableName( "demo_user")//实现对象与便表名映射
public class User {
    //设置主键递增
    @TableId(type = IdType.AUTO)
    private Integer id;
    //@TableField("name")//实现属性与字段的映射名字一样可以省略不写
    private String name;
    //@TableField("age")
    private Integer age;
    //@TableField("sex")
    private String sex;
}
